<template>
  <div class='voucher-detail first-box pr'>
    <img :src="imgs.bac1" alt="">

    <p class="head pa">关注公众号可以领取</p>

    <img :src="imgs.qrcode" class="code pa" alt="">

    <p class="btn-box pa">
      <span>
        <img :src="imgs.bac2" class="pa" alt="">
        <span>长按二维码关注</span>
      </span>
    </p>

  </div>
</template>
<script>
export default {
  components: {},
  name: "",
  data() {
    return {
      showModel:false,
      imgs:{
        bac1:require('../../../../assets/img/vip/voucher/bac4.png'),
        bac2:require('../../../../assets/img/vip/voucher/3.png'),
        qrcode:require("../../../../assets/qscode/code.jpg")
      },
      info:{
        money:"",
        title:"",
        cardnumber:"",
        endtime:"",
        condition:"",
        shareLevel:"",
      },

    };
  },
  methods: {
    save(){
      
    },
    getDetail(){
      var params={
        id:sessionStorage.getItem("detailId")
      }
      _g.apiPost("couponApp/getUserCouponInfo.do",params).then(res=>{
        var obj={
          money:res.data.couponValue,
          title:res.data.couponName,
          cardnumber:res.data.codeNum,
          endtime:res.data.validTill,
          condition:res.data.consumptionFull,
          shareLevel:res.data.shareLevel,//分享等级
        }
        this.$set(this,"info",obj)
      })
    }
  },
  created() {
    this.getDetail()
  }
};
</script>
<style lang="scss" scoped>
.voucher-detail {
  background: linear-gradient(left bottom,#EE9700,#F5DC00);
  background: -webkit-gradient(linear, left bottom, right top, from(#EE9700), to(#F5DC00));
  padding: 15px;
  box-sizing: border-box;
  text-indent: 0;
  overflow: auto!important;

  >img{
    width: 100%;
    height: 100%;
  }

  .code{
    width: calc(100vw - 120px);
    height: calc(100vw - 120px);
    top: 80px;
    left: 60px;
  }

  .head{
    top: 60px;
    width: 100%;
    left: 0;
    font-size: 12px;
    color:#333;
    text-align: center;
  }
  .btn-box{
    width: 100%;
    left: 0;
    top: calc(50% + 140px);
    text-align: center;

    >span{
      display: inline-block;
      width: calc(100% - 90px);
      background: linear-gradient(left bottom,#FF6613,#FFA200);
      background: -webkit-gradient(linear, left bottom, right top, from(#FF6613), to(#FFA200));
      height: 40px;
      border-radius:40px;
      line-height: 40px;
      font-size: 14px;
      color:#fff;

      img{
        width: 25px;
        height: 25px;
        left: 100px;
        top: 50%;
        transform: translateY(-50%);
      }
    }
  }
}

</style>